import { defineStore } from "pinia";
import storage from "@/utils/storage";
export const useAppStore = defineStore("app", {
  state() {
    return {
      isCollapse: false,
      menuType: (storage.get("menuType") || 0) as number,
    };
  },
  getters: {},
  actions: {
    toggleMenuType() {
      const type = this.menuType == 1 ? 0 : 1;
      storage.set("menuType", type);
      this.menuType = type;
    },
  },
});
